package com.wind.employee.service.impl;

import java.util.List;
import com.wind.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wind.employee.mapper.ChenEmployeeMapper;
import com.wind.employee.domain.ChenEmployee;
import com.wind.employee.service.IChenEmployeeService;

/**
 * 职工表自动生成Service业务层处理
 * 
 * @author 陈修昊
 * @date 2023-05-16
 */
@Service
public class ChenEmployeeServiceImpl implements IChenEmployeeService 
{
    @Autowired
    private ChenEmployeeMapper chenEmployeeMapper;

    /**
     * 查询职工表自动生成
     * 
     * @param id 职工表自动生成主键
     * @return 职工表自动生成
     */
    @Override
    public ChenEmployee selectChenEmployeeById(Long id)
    {
        return chenEmployeeMapper.selectChenEmployeeById(id);
    }

    /**
     * 查询职工表自动生成列表
     * 
     * @param chenEmployee 职工表自动生成
     * @return 职工表自动生成
     */
    @Override
    public List<ChenEmployee> selectChenEmployeeList(ChenEmployee chenEmployee)
    {
        return chenEmployeeMapper.selectChenEmployeeList(chenEmployee);
    }

    /**
     * 新增职工表自动生成
     * 
     * @param chenEmployee 职工表自动生成
     * @return 结果
     */
    @Override
    public int insertChenEmployee(ChenEmployee chenEmployee)
    {
        chenEmployee.setCreateTime(DateUtils.getNowDate());
        return chenEmployeeMapper.insertChenEmployee(chenEmployee);
    }

    /**
     * 修改职工表自动生成
     * 
     * @param chenEmployee 职工表自动生成
     * @return 结果
     */
    @Override
    public int updateChenEmployee(ChenEmployee chenEmployee)
    {
        chenEmployee.setUpdateTime(DateUtils.getNowDate());
        return chenEmployeeMapper.updateChenEmployee(chenEmployee);
    }

    /**
     * 批量删除职工表自动生成
     * 
     * @param ids 需要删除的职工表自动生成主键
     * @return 结果
     */
    @Override
    public int deleteChenEmployeeByIds(Long[] ids)
    {
        return chenEmployeeMapper.deleteChenEmployeeByIds(ids);
    }

    /**
     * 删除职工表自动生成信息
     * 
     * @param id 职工表自动生成主键
     * @return 结果
     */
    @Override
    public int deleteChenEmployeeById(Long id)
    {
        return chenEmployeeMapper.deleteChenEmployeeById(id);
    }
}
